-
Notifications
You must be signed in to change notification settings - Fork 52
List models using open ai api #1234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ccelerated-data-science into track_md_logs_for_error_logging
…o list_models_using_openAI_API
…-science into list_models_using_openAI_API
…racle/accelerated-data-science into list_models_using_openAI_API
…racle/accelerated-data-science into list_models_using_openAI_API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added some minor comments
ads/aqua/client/client.py
Outdated
@@ -582,6 +582,19 @@ def embeddings( | |||
payload = {**(payload or {}), "input": input} | |||
return self._request(payload=payload, headers=headers) | |||
|
|||
def list_models(self) -> Union[Dict[str, Any], Iterator[Mapping[str, Any]]]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the logic in this method here seems generic, should we call it fetch_data
or get_json_response
instead oflist_models
? Also, docstrings need to be changed here.
self.set_header("Content-Type", "application/json") | ||
endpoint: str = "" | ||
model_deployment = AquaDeploymentApp().get(model_deployment_id) | ||
if model_deployment.endpoint.endswith("/"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can simplify this with something like:
endpoint = model_deployment.endpoint.rstrip("/") + "/predict/v1/models"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 👍
there are a few failing tests, can you check them?
Description
BASEURL/aqua/deployments/models/list/<md_ocid>